﻿using System;
using System.Collections.Generic;

using System.Text;

namespace TimKen.DataEntity
{
    /// <summary>
    /// 订单子单身实体类
    /// </summary>
    public class OrderItem
    {
        public OrderItem()
        { }
        #region Model
        private string _orderitemid;
        private string _orderid;
        private int _itemno;
        private string _itemcode;
        private string _barcode;
        private string _batchnumbers;
        private decimal _basicprice;
        private decimal _discount;
        private decimal _finalprice;
        private decimal _taxrate;
        private decimal _quantity;
        private decimal _totalamount;
        private decimal _baseamount;
        private decimal _taxamount;
        private DateTime? _deliverydate;
        private decimal? _deliveryqty;
        private decimal? _weight;
        private decimal? _totalweight;
        private string _weightunit;
        private int? _shiptype;
        private string _shiptocode;
        private string _itemremark;
        private int? _itemstatus;
        private int _productid;


        /// <summary>
        /// 系统自动产生的GUID
        /// </summary>
        public string OrderItemID
        {
            set { _orderitemid = value; }
            get { return _orderitemid; }
        }



        /// <summary>
        /// 与SalesOrder.OrderID关联
        /// </summary>
        public string OrderID
        {
            set { _orderid = value; }
            get { return _orderid; }
        }
        /// <summary>
        /// 订单行项次
        /// </summary>
        public int ItemNo
        {
            set { _itemno = value; }
            get { return _itemno; }
        }
        /// <summary>
        /// 商品编号 与Product.ItemCode关联
        /// </summary>
        public string ItemCode
        {
            set { _itemcode = value; }
            get { return _itemcode; }
        }

        /// <summary>
        /// 商品编号 与Product.ProductID关联
        /// </summary>
        public int ProductID {
            set {
                _productid = value;
            }
            get {
                return _productid;
            }
        }

        /// <summary>
        /// 商品条码（暂时不做考虑）
        /// </summary>
        public string BarCode
        {
            set { _barcode = value; }
            get { return _barcode; }
        }
        /// <summary>
        /// 产品批号（暂时不考虑）
        /// </summary>
        public string BatchNumbers
        {
            set { _batchnumbers = value; }
            get { return _batchnumbers; }
        }
        /// <summary>
        /// 产品标准价格，来源于Product.BasicPrice
        /// </summary>
        public decimal BasicPrice
        {
            set { _basicprice = value; }
            get { return _basicprice; }
        }
        /// <summary>
        /// 客户折扣率
        /// </summary>
        public decimal Discount
        {
            set { _discount = value; }
            get { return _discount; }
        }
        /// <summary>
        /// 最终价格
        /// </summary>
        public decimal FinalPrice
        {
            set { _finalprice = value; }
            get { return _finalprice; }
        }
        /// <summary>
        /// 产品税率：来源于Product.TaxRate
        /// </summary>
        public decimal TaxRate
        {
            set { _taxrate = value; }
            get { return _taxrate; }
        }
        /// <summary>
        /// 购买数量
        /// </summary>
        public decimal Quantity
        {
            set { _quantity = value; }
            get { return _quantity; }
        }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit
        {
            get;
            set;
        }

        /// <summary>
        /// 含税总金额
        /// </summary>
        public decimal TotalAmount
        {
            set { _totalamount = value; }
            get { return _totalamount; }
        }
        /// <summary>
        /// 未税金额
        /// </summary>
        public decimal BaseAmount
        {
            set { _baseamount = value; }
            get { return _baseamount; }
        }
        /// <summary>
        /// 税额
        /// </summary>
        public decimal TaxAmount
        {
            set { _taxamount = value; }
            get { return _taxamount; }
        }
        /// <summary>
        /// 实际交货日期（由出货单回写）
        /// </summary>
        public DateTime? DeliveryDate
        {
            set { _deliverydate = value; }
            get { return _deliverydate; }
        }
        /// <summary>
        /// 已交货数量（由出货单回写）
        /// </summary>
        public decimal? DeliveryQty
        {
            set { _deliveryqty = value; }
            get { return _deliveryqty; }
        }
        /// <summary>
        /// 单位重量：来源于Product.Weight
        /// </summary>
        public decimal? Weight
        {
            set { _weight = value; }
            get { return _weight; }
        }
        /// <summary>
        /// 重量小计
        /// </summary>
        public decimal? TotalWeight
        {
            set { _totalweight = value; }
            get { return _totalweight; }
        }
        /// <summary>
        /// 重量单位：来源与Product.WeightUnit
        /// </summary>
        public string WeightUnit
        {
            set { _weightunit = value; }
            get { return _weightunit; }
        }
        /// <summary>
        /// 运输方式：与TransType.TransTypeID相关联(保留不用)
        /// </summary>
        public int? ShipType
        {
            set { _shiptype = value; }
            get { return _shiptype; }
        }
        /// <summary>
        /// 送达地编号(保留不用)
        /// </summary>
        public string ShipToCode
        {
            set { _shiptocode = value; }
            get { return _shiptocode; }
        }
        /// <summary>
        /// 备注
        /// </summary>
        public string ItemRemark
        {
            set { _itemremark = value; }
            get { return _itemremark; }
        }
        /// <summary>
        /// 当前行状态：Open/Close
        /// </summary>
        public int? ItemStatus
        {
            set { _itemstatus = value; }
            get { return _itemstatus; }
        }


        public DateTime RequestDate
        {
            get;
            set;
        }
        #endregion Model

    }
}
